package oop6;

import java.util.Scanner;

public class Menuselectioninterface {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		System.out.println("1:登录");
		System.out.println("2:注册");
		System.out.println("3:联系客服");
		System.out.println("输入你要进行操作的序号：");
		do {
			try {
				int i = sc.nextInt();
				switch (i) {
				case 1: {
					System.out.println("登录");
				}
					return;
				case 2: {
					System.out.println("注册");
				}
					return;
				case 3: {
					System.out.println("联系客服");
				}
					return;
				default:
					System.out.println("输入的序号不存在,请重新输入：");
					break;
				}
			} catch (Exception e) {
				System.out.println("输入int类型：");
				e.printStackTrace();
				sc.next();
			}
		} while (true);
	}
}
